using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace ShopForWeb.Models.Basic
{
  /// <summary>
  /// OrderDetails
  /// </summary>
  [Table("T_OrderDetails")]
  public partial class OrderDetails
  {
    /// <summary>
    /// 数量
    /// </summary>
    public int Number { get; set; }

    /// <summary>
    /// 订单ID，主键，GUID
    /// </summary>
    public string OrderId { get; set; } = "";

    [ForeignKey("OrderId")]
    public virtual Order CorOrder { get; set; } = null!;

    /// <summary>
    /// 商品·ID，主键，自增
    /// </summary>
    public long ProductId { get; set; }

    [ForeignKey("ProductId")]
    public virtual Product CorProduct { get; set; } = null!;


    /// <summary>
    /// 成交价
    /// </summary>
    [Column(TypeName = "decimal(18,2)")]
    public decimal SalePrice { get; set; }
  }
}
